package cn.egame.extraction.service;

import java.util.List;
import java.util.Map;

import cn.egame.common.exception.ExceptionCommonBase;
import cn.egame.extraction.dao.ReportGameDayDownDao;
import cn.egame.extraction.util.DateType.TimeType;

public class ReportGameDayDownService {
	private static ReportGameDayDownService instance = null;
	private static byte[] lock = new byte[0];

	public static ReportGameDayDownService getInstance()
			throws ExceptionCommonBase {
		if (instance == null) {
			synchronized (lock) {
				if (instance == null) {
					instance = new ReportGameDayDownService();
				}
			}
		}
		return instance;
	}

	private ReportGameDayDownDao dao = null;

	public ReportGameDayDownService() throws ExceptionCommonBase {
		dao = new ReportGameDayDownDao();
	}

	public List<Integer> listReportGameDayDownGId() throws ExceptionCommonBase {
		return dao.listReportGameDayDownGId();
	}

	public int getReportGameDayDownCountByDay(int gId)
			throws ExceptionCommonBase {
		return dao.getReportGameDayDownCountByDay(gId);
	}

	public int getReportGameDayDownCountByWeek(int gId)
			throws ExceptionCommonBase {
		return dao.getReportGameDayDownCountByWeek(gId);
	}

	public int getReportGameDayDownCountByMonth(int gId)
			throws ExceptionCommonBase {
		return dao.getReportGameDayDownCountByMonth(gId);
	}

	public int getReportGameDayDownCountIncrByDate(int gId)
			throws ExceptionCommonBase {
		return dao.getReportGameDayDownCountIncrByDate(gId);
	}

	public int updateReportGameDayDownCountIncr(int gId)
			throws ExceptionCommonBase {
		return dao.updateReportGameDayDownCountIncr(gId);
	}

}
